package code.c08;

import java.util.Collection;
import java.util.LinkedList;

/**
 * @author thinkpad - 83start
 * @version v1.0
 * @create 2022/10/20 10:17
 * @package code.c08
 * @description 文件说明
 */

public class ListTest {
    public static void main(String[] args) {
        // 顺序表
//        Collection<Student> students = new ArrayList<>();

        // 链表
        Collection<Student> students = new LinkedList<>();
        students.add(new Student(101,"黄"));
        students.add(new Student(102,"蓝"));
        students.add(new Student(103,"吕"));

        // 整体输出
        System.out.println(students);

        // 分别输出学生对象
        for (Student s:students) {
            System.out.println(s);
        }
    }
}
